package com.jjz.id.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jjz.id.common.BaseEntity;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;

/**
 * @author ZJL
 * @create 2025-05-27-16:25
 */
@TableName("oauth2_role_info")
@Data
public class Role extends BaseEntity implements GrantedAuthority, Serializable  {
    private static final long serialVersionUID = -1L;
    @TableId
    private String id;
    private String code;
    private String title;
    private String description;
    private Integer enabled;
    public String getAuthority() {
        return "ROLE_" + this.code;
    }
}
